import { Guard } from '../../constants/guard';

export default [
  {
    path: '/alarm',
    name: 'alarm',
    meta: { title: '报警管理', svg: 'alarm-control', layout: true, guardList: [Guard.AlarmRuleView, Guard.AlarmRuleManage] },
    redirect: '/alarm/rule/list'
  },
  {
    path: '/alarm/rule/list',
    name: 'alarmRuleList',
    meta: {
      title: '报警规则',
      svg: 'alarm',
      layout: true,
      parentMenu: 'alarm',
      guardList: [Guard.AlarmRuleView, Guard.AlarmRuleManage]
    },
    component: () => import('../../views/alarm/rule/index.vue')
  },
  {
    path: '/alarm/rule/add',
    name: 'alarmRuleCreate',
    meta: {
      title: '添加报警规则',
      svg: 'alarm',
      layout: true,
      hidden: true,
      parentMenu: 'alarm',
      guardList: [Guard.AlarmRuleManage]
    },
    component: () => import('../../views/alarm/rule/add.vue')
  },
  {
    path: '/alarm/rule/edit/:uuid',
    name: 'alarmRuleEdit',
    meta: {
      title: '更新报警规则',
      svg: 'alarm',
      layout: true,
      hidden: true,
      parentMenu: 'alarm',
      guardList: [Guard.AlarmRuleManage]
    },
    component: () => import('../../views/alarm/rule/edit.vue')
  },
  {
    path: '/alarm/history',
    name: 'alarmHistory',
    meta: {
      title: '报警记录',
      svg: 'alarm',
      layout: true,
      parentMenu: 'alarm',
      guardList: [Guard.AlarmHistoryView, Guard.AlarmHistoryManage]
    },
    component: () => import('../../views/alarm/history/index.vue')
  }
];
